revert index
fix type