fixed bug for ios5