fixed race condition with path highlighting