Added robust on_complete