fixed index a bit
fixed a type