Fix bugs in session helper