Fix minor calculation issue