fixing problems with input value and submit