added some mac compatibilty