Merging z-uo's fixes and improvements