Fixing error on  simple calculation