external main fix