A few fixes to allow for backwards compatibility to iOS7