fixed a bug in capture
fixed bug with capture