Added max_length to invitecode