Fixed compile errors in the model