fixed a bunch of compile error