fix bugs on iPad with iOS6