Fix some -Wconversion problems