changed array indices for JSON data returned from the members API and added some more robust error handling, fixes issue #3