Initialize arrays correctly