Minor fix for edge case in error handler.