fix bug[msg thread safe fixed]