bugfixes and other stuff