fixed mac related stuff