fix less bugs on index