Fixed some editing bugs