fix for issue #165