Fixing issue #277 in branch 2.6