Fix compile error problems