fix bug: fix message outside of db_session bug