pointer clean error fixing