Fix bug with deleting messages

Fixes bug with deleting messages
Fixes #2