Fix CKAN error. Closes #619