fixed a bug related to binding Model class to the Entity definition