Input bugs fixed