Oh dear god all the bugfixes