iOS8 fixes

fixed small bugs for iOS8