Fix integer division-related issue in stake rewards calculation