Fixed ios 8 compatiblity