Added bad input rejection cases