"Without the amendment of the Criminal Code in 1998 the courts responsible for the execution of the sentences would not have had jurisdiction to extend the duration of the detention," the court said in its ruling.