Capture locations in variable not working before this patch.

YL