Fix bug, these changes should go with previous commit -refs BT#8403