fix js behaviors for submit buttons