fix MaxOS X compatibility issue