Updates and fixes to be compatible with iOS8