fixed bug in unit and updated FindHitObject to be deterministic