fix bug of forward, erase msgs when error