Problem with max-all-session check