fixing key not in session error