Fixed AppKit thread issue.