Fix deleting message problem.