fixing pointer issue'