manual tracking: fixed iteration bug