Added mac compatibility