fix db session problem