Removing duplicate bgs