fix the binding bugs and the IR interface