Fix exception when reverting a new model with no data