fix bug for ios