Fix for issue #299