fix pointer issue