Fixed exception on emply string and max_length