Fix small bug where calc button classname was sometimes set incorrectly.