fix issue #641