Fix for capture buffer overrun; to be tested on hardware