Fixed typo in calculate method