Fixed bug in getSessionId