Fixed bugs in CKAN legacy API support.