This thread has some information on degumming if you scroll down a bit. The video is worth watching as well. My guess to the smell would be the result of a non-cannabinoid vapor trapped in the system, degrading, and contaminating the distillate. It’s common for my first pass to have a little whiff of something when I harvest the receiving flask.