Fix bad casting syntax

- Reverse the casting that i added to stop warning, works on windows
but not on mac :(