More and more bugfixes