Fixed changed calculation code for null cases
Fixed changed calculation code for null cases

GemsTracker/gemstracker-library,GemsTracker/gemstracker-library,GemsTracker/gemstracker-library,GemsTracker/gemstracker-library