fix iOS8 compatibility