fixed os x yosemite compatibility