Remove on_definition callback from entity