Fix for clang warnings on struct/class mismatch
Fixed narrowing bug in bind with clang