Bugfixes and stuff
More bugfixes