fix common calculation