Some fixes on the model