fixes issue #2667