fix ctz/clz bitwise operation implementation