Fixed iOS 7 deprecation warnings

Fixes 2 deprecation warnings