Potential fix for issue #22