fixes for compiling with MSVC at /W4: explicit ctor, explicit truncating casts