Fix bug of sessions