I'm not sure I agree with the idea that you can only be sentenced in accordance to the laws at the time of the offence tbh but there we go.
It simply wouldn't be fair any other way. A shame in this instance, but we can't go changing laws retrospectively.