An unexpected error occured: [] operator not supported for strings