fix issue #495