Fixed the randomally generated array to correctly populate.