fix OSX backward compatibility issue