Under ex post facto principles, the accessible amount of a sex offender fine must be calculated as of the date of the offense. Appellant was convicted of a sex offense that occurred in 2003 and 2004, and, as a result of the conviction, was liable for imposition of a fine pursuant to Penal Code section 290.3. Although the fine amount prescribed by the statute at the time of the offense was $200, the court imposed a $300 amount reflecting the modification to the statute in 2006, increasing the amount for a first offense to $300. Because the $300 amount violated the prohibition against ex post facto principles, it was an unauthorized sentence and could be corrected at any time, even in the absence of an objection in the trial court. (In re Sheena K. (2007) 40 Cal.4th 875.) The court also found that since it is presumed the trial court complied with its duty and made a requisite finding of appellant’s ability to pay a $300 fine, there would be an ability to pay the corrected $200 fine. But the trial court failed to impose penalty assessments on the $300. Because the correct fine of $200 with the mandatory penalty assessments would increase the total amount owing to $680, the trial court was required to conduct a new ability-to-pay finding on the corrected $680 amount.