fix bug for calc