fix the bugs in All and Any operations