Fixed issue #1822