Fix dev mode error handler