backport of SP3 fix