fixing editing bugs