Fix regression due to new -endpoint flag