Appellant was charged with substance abuse offenses occurring in 2003. Trial began in March, 2004. In June, 2004, appellant was sentenced to state prison. Appellant was ordered to pay restitution, fines, and fees including a $20 security fee under Penal Code section 1465.8. That section was enacted in August, 2003, after the date of the offenses, but before appellant’s conviction and sentencing. On appeal, appellant argued that the trial court erred in imposing the security fee because the offenses were committed before the effective date of the statute authorizing the fees. The appellate court agreed and struck the security fee. The determining factor was whether section 1465.8 created a new legal consequence which increased appellant’s liability. The imposition of the fine necessarily did, so retroactive application was improper. It did not matter that the section was enacted for a nonpunitive purpose.