Capture bugfix
Additional debugging added.