Added Peter's UIKit main thread gaurd