Fix minor error handler bug