Fix issue #543