fixed max check for next listener