fix some bug, and it can compile now