Fix issue when removing a publication