iOS: bug fixing