fix for issue #40