Various fixes and stuff.