fix for issue #1339