bug fix for submit button click