Better session handling fix