Fix wrong use of delete operator
Fix wrong bitwise and operator
Fix compile warnings under clang