Fix for issue #1339