fix retrieving data from session