Merge "Fix preventing from heap overwrite in capture command"