PassiveAgent: Minor changes

Loops have been optimized.