fix incorrect conditional