Fixed bug with setting pristine and submit