Finally have editing working... except it creates another rather than edits the existing