fix for issue #166