title: My images are not loading in order in my table view
body: <p>I have an iOS app that has an events section where users can post events and attach a flyer image. everything works except two mages show up on top no matter what I do. And I have programmed the app to show the most current post at the top of the table view. Any help would be greatly appreciated.</p>
  
  <pre><code>eventsDatabaseHandle = eventsRef?.child("Church Events").observe(.childAdded, with: { (snaphot) in
      let eventPost = snaphot.value as! [String: Any]
      var event = Event(title: eventPost["eventtitle"] as! String,
                        timestamp: eventPost["eventdate"] as! String,
                        location: eventPost["eventlocation"] as! String,
                        image: nil)
  
      let task = URLSession.shared.dataTask(with: URL(string: eventPost["ImageUrl"] as! String)!) { data, _, error in
  
          if let image: UIImage = UIImage(data: data!) {
              event.image = image
              DispatchQueue.main.async {
                  self.events.append(event)
                  self.tableView.reloadData()
              }
          }
      }
      task.resume()
  
  })
  </code></pre>