Fix bugs to be compatible with OT 2.4.1