Cast to remove the narrowing conversion error in c++11.