Fix issue #641