fix for issue #976