simplification that is almost equivalent to the previous ksafety2 patch