Add id to form and fix some if statements