sanitize fix and improvements