I hope it doesn't cause a problem getting the session here? (see comment on L102)