Fix indexes of inputs