some pep sanitizing and fixes