Fix bug in model base