Fixed the problem with socket sessions