BUG: fix syntax error in if statement

fix a small syntax error in 79b86628ab5ec4e380b99d5e4905243129777c18