Fixed issue #823