Fixed major bug in input