Fixed error with calc method