Government works to fix legal issue after they 'monumentally stuffed up'.