fixed deleting message correctly