remove references to current_entity