fix bug for ios8