Correct ptr overwrite