Correct stale pointer dereference