Added check for ios 7