Fixed a couple of compiler errors with latest iOS