cleanup
fix record index