Fix for issue #824