Issue with updating module with JS

Hey, I have the SEAL app installed in a store for suscriptions. It works good, but it depends on JS for customization.

I’ve a code that injects a new field to show a price per sachet (the box has 16).
No I’ve created a bundle selector to update the price per sachet once you click a different quantity in the selector.
The issue i’m having is it updates the price per unit before the bundle price changes. For a brief moment, you see the price of the previous bundle divided per the new quantity, and it looks odd. Then it shows the right price.

Any ideas on how to solve this?

This is the code:

Thanks!