load of fixes and stuff