Applied fixes to not_fn from Daniel Krügler.