Compilation and merge fixes