fix the if condition can not work on previous commit