fixed Mac comptibility bug