fix for creating model object