Added check on submit_form to see if parameters are arrays