fixed 2 bugs

Hi Mike, by no means do I want to step on any work in progress but I think this might be of help.