fix apply index