input handling fixes