Fix for issue #557