bug fix to editing