Fix object generation