more bug fixes

i may have cought a few things that could have caused the problems you
were finding.