Fixing editing bugs