Fix -Wconversion problems
Merge pull request #141 from bilgili/master

Fix some -Wconversion problems