Zeqing Guo: fix bugs