Fixing bug when 2 overlays exist.