GRECLIPSE-1693 Fix and unit test