fine tune session handling