Fixed msgs grouping after delete

Closes #481