fix maxlength for search