Fixed heap allocation error.