small improvements and bugfixes