Fix edit or add will submit twice