fix DB mode bug

closed #9