Bunch of fixes

Sweet :)