Fixed typo on captureDelay

Now it works when passing the captureDelay variable!