fixed some of the bugs reported in the hotfix thread