Fix crash on iOS8 and closes #9