somes issues fixes and improvements