Fixed the form to loop through dictionary correctly.