fix issue #647