fix issue #769