fixed typo in getEndpoints