fix bugs in iOS7