fixed errors for input