fix typo in if statement