Fix #599

Fix issue #599