remove loading flag, when server returns error