Fix for issue #538