fixed a bug introduced in previous commit with the session id