Fixed Ajax call to return deferred results.