some mac specific fixes