Fix some bugs on iOS7.