removed bug from CalculationThread