fix silly calculus bug