Fix bugs of loop_delay wuclass in C and JAVA