Fixed more compile bugs