fix idx on multiple execs