Changed Capture.read() logic to work better than before.