fix kind and mode array