Fix for issue #244

This PR should close issue #244.