Fixed for loop in firereset()