Fixed a bunch of little bugs as reported by Fabian Keil.