Potential fix for issue #44. More testing required.