fix minor bugs in ios