fixed compiler warnings from clang's -Wconversion