fixed bug in recalc