Fix editing and add bug