Various bugfixes XD