Fix object creation error