Fixed errors in the model