Fixed iOS 6 crashes.

Used some iOS7 only features by mistake, it has been rectified.