different fixes and improvements