Fixed bug of wild running pointer