Fixed bug of submit