Improve input security