fixed edit dialog so that it does not reload the page