fix issue #15 and other super minor changes

fix issue #15: throwing out form data when invalid