First Minister Alex Salmond helped conduct the draw
The CIS Cup semi-final fixtures have been ammended following a mix-up during Thursday's draw at Holyrood.
Rangers will now play Hearts, while Aberdeen will meet Dundee United, the Scottish Football League has confirmed.
Scottish Parliament presiding officer Alex Fergusson mixed up the numbers, and miscalled the ties when the four balls were drawn.
"This was a genuine error and I can only apologise for the confusion caused," said Mr Fergusson.
The Scottish Football League have alreayd written to the clubs to notify them of the error.
The presiding officer added: "We have worked as quickly as possible with the Scottish Football League to resolve the situation.
"As a life long Stranraer fan I think everyone can be assured that there was no ulterior motive."
David Longmuir, chief executive of the Scottish Football League said: "The SFL has a duty to the teams involved to correct the error and to protect the integrity of the draw." In the original draw, Rangers were announced as playing against Aberdeen, while Hearts were due to face Dundee United.