Improve mac support.