Fixed issue when removing a publication