fix bugs under ios6