fix small typo in condition check