Fixing some build errors and warnings.