Fix compile bugs from different definitions