fixed  AutoRoute logic