CDB-2959 Fixed wrong number of overlays