emit done and delete message on done