minor improvements and bugfixes