Fix several input check corner cases