Fixing bugs in the front-end calc functionality.