[QE-1024] Fixing boolean logic (again)