final bugfixing I hope