Some fixes and stuff