fixes issue #7965

Why this was removed?!