Changed algorithm to detect overlapping sessions.