Add fix and regression test for capture and cloak.