This fixes issue #578