Fix for issue #40