Conditionals causing form to timeout. How can this be fixed?