Fix get_session implementation