General fixes and stuff