fixed bug in sanitize