Fixes issue #768