fix issue #766