fix for github issue #1151