added some fixes to the sanitization stuff