fix some silly pointer issue