Misc fixes
Test ScalarWrapper