corrected bug for pointer chasing