Fixed bug when starting session.