Celtic will host Greenock Morton in the Scottish Cup quarter-finals after a malfunction with the original draw saw them avoid a trip to Dundee United.
The Scottish champions were initially heading to Tannadice before one of the balls opened, forcing a re-draw.
Holders Inverness Caledonian Thistle face an away tie against Hearts or Hibs, while League Cup finalists Ross County will host Dundee United.
Rangers or Kilmarnock will play either Dundee or Championship side Dumbarton.
Dundee, sixth in the Premiership, or Dumbarton – eighth in the tier below – originally had a home draw and were awaiting to discover their opponents when the farcical scenes began.
Instead the winner of next week’s fifth-round replay will travel to either Ibrox or Kilmarnock’s Rugby Park in the last eight.
At least one all-Premiership tie will see Highland outfit Ross County favourites to progress to a second domestic cup semi-final of the season against basement club United.
Scottish Cup quarter-final draw (matches to take place on the weekend of 5/6 March):
Hearts/Hibernian v Inverness Caledonian Thistle
Celtic v Greenock Morton
Ross County v Dundee United
Rangers/Kilmarnock v Dundee/Dumbarton