fixed the each loop in index, fixed the new form