955c90a restore key parts of 0004 patch

Authored and Committed by spot 4 years ago
    restore key parts of 0004 patch