Fixed some inputbugs