Error in prototype model class