SONARDOTNT-382 Apply Peter Stevens's pull request