Fix major bugs in chat deletion