Fix for issue #240