some minor fixes and improvements