check for max_length = None and lots of misc logging