gteq here changes logic from returning first match to returning last match.  Use gt or !gteq(maxF, fx) or somesuch.