Fix Api submit method