fix for calculations