Added extra input sanitation.