minor fixes and improvements
minor fixes and improvements