Fixed a bug that some command is not working when sql-alchemy-session is given as other_sess.