minor Bugfixes and improvements