Mac related fixes.