Bug fix to the previous implementation of TCalculator