Fixed some compile bugs.