Hi here is a couple of fixes for check mode. The most important one is patch 2. Pavel is it look reasonable or better provide mode as an argument and won't play with ns mask at all? The rest is just unification, we threat negative rets as errors all over the code thus lets be consistent and use this approach in check mode as well.