Fixing up the code for IOS changes.