completely solve the problem with pointer correction