fixed bug (missing max_length)