Fixed issue #807