Fix issue #497