Fixed session = null in socket