Adding a range check (IsSpellInRange(GetSpellInfo(57934), "focus") == 1) would probably solve that, PQR_IsOutOfSight() doesn't work which is a known issue with PQR, UnitIsDead() might need to be changed to UnitIsDeadOrGhost() because if your focus target has died and released spirit it could still try to Tricks them.