fixes issue #5199