Remove cast warnings
Merge pull request #1 from Threadflip/warning-fix

Remove cast warnings