Fixing captured point counting algorithm