Bug fixes for iOS7