Fix typo

Fix checking for wrong pointer. It's an understandable mistake, but still a mistake.