fixed bugs thread bugs in captureViewController in GUI.