Fixed a bug in handling callbacks via main queue.