Wait a second before detecting current path

Even after clicking a button, sometimes this takes a second on ci.