Build and warning fixes.