fixes for refreshing session