Fixes a calc bug pointed out in #40