Resolved problem with submit showing up despite invalid fields