Casting without reason can only be confusing (because it is not needed), or wrong (because it does the wrong thing).
For example, the added test that adds a positive chunk prioritization will fail:
0AssertionError: not(-1.94936096 == 41.000312)
Fix all issues by removing the erroneous casts, and by adding a test to check against regressions.