Patches for a few bugs in check_nwstat [sf#1235879] [#487]