Compiled and checked on my own computer. Seems bug-free, but need a test on the lab computer.