fix creating objects