fix broken mac support