I am creating a simulation that models a spring loaded launcher throwing a projectile straight up into the air, and then pauses at the top.  When creating graphs of the PEsp, PEg, KE and ME of the system I noticed that there is an increase in total energy when the projectile is launched.  After the launch everything seems to be fine, but I cannot figure out why there is an increase in energy in the beginning.  The PEg, should go up, the KE should go up and the PEsp should go down, but they should all balance out.

The only guess I have is that is might have something to do with the solver (I am using Euler-Richardson on 0.02 increments)  I tried lowering the increment to 0.01, 0.001 and it seemed to help but I could never get rid of the energy increase in the beginning.  Just not sure if this is a error in my programing, or something that it a limitation of how the DEq is being run.

I attached my .ejs file, so hopefully someone with different eyes might spot something.

thanks in advance,
Mike