fixes for the metadata REST api