Bugfixes (some big ones)