Small changes for iOS compatibility.