fix edit bugs, better form cancels