Fix some warnings for clang / 64bit windows
Fix arity of functions

A value was being accessed after it was moved.