Mod: ktools_entity_id(), make it more effective.