fix possible problem of delete chat