improve index build check