fixed deletion and editing