Relocated if statement index