Fix undefined variable in Scanner.process_controller error handler