Fix whre condition