Enhance max_length option, not sure that it works perfectly though...