issue #822 fixed