fixed autocomplete bug when session was empty