Cherry pick from https://github.com/pentaho/marketplace/commit/95cc046b4e05799ac21aa1acf0548c773496e7a5