Fix object allocation