The cast is important.

I put it there to silence a warning when building the python module.
To appease my OCD, put it back.