fix matches endpoint