Fixes JavaScript calculator issue seen in production.