Fixing issue generating List elements array