Fix for issue 675
[x] Crash issue has been addressed. It was happening because of incorrect type casting for brate_surplus computation.
[x] Crash issue has been addressed. It was happening because of incorrect type casting for brate_surplus computation.