Fixes non C++0x compile time error
Fixes incorrect assignment of wrongtype
Functional examples