fixing bug on capture