Minor changes to input handling