Various fixes that prevented successfull harvesting and extraction in my...

... environment

I hope the comments next to each change can serve as explanation for the fix in question.