Fix silly mistakes, capture works!

There may be an off-by-one error here or there.