fixing boolean list comparison