Bug fix for currency calculation