fix ramp & direction index