Determine arrays correctly