Try to improve input handling