Fixed issues with maxLength