fixed pointer issue