bad forward/backward inputs throw exceptions instead of crashing python