Add explicit typecast.

Fix warning in MSVC.
Partial-fix for assignment operator.

Don't count on this working.