bugfixes and improvements...