Fixed bug with calculating captures