Fix compile errrors