try to made compatible with mac