Remove some useless castings

Sorry I couldn't resist.
Merge pull request #102 from byroot/patch-1

Remove some useless castings