Various fixes for CKAN.