Fixed issue #1766