Fixed issue #495