Changing order to error handlers