Fixed the redundant lines on pointer cleanup.