Fixed a main queue context issue