added one more submit button condition check