Fixed issue #497