fix error in create method