fix bugs on ios