increased MAX_STRING_LEN to 512