Fixed code for sanitziation