fix edit mode