fixed sort method

Fixes the api if a failure response from spreedly occurs