handleMessages finish