Fix a bug and add session_start