Fixed some compile bugs, not all