fix creating class objects