Fixed all compile errors after merge.