Put the session fetching in the right place