fix bug with submit