fix race condition in index
fix race condition in index

eric-haibin-lin/peloton,eric-haibin-lin/peloton,eric-haibin-lin/peloton,eric-haibin-lin/peloton,eric-haibin-lin/peloton,eric-haibin-lin/peloton,eric-haibin-lin/peloton