Changed loop evaluation, removed alive check for unit.

Infinite if loop -> conditional while loop