Fix compile and ctor problems.