repair pointer bug