replace of max_char to MAX_CHAR