fixed input errors