fix endpoints