Changed pointer reset condition