fix issue #16 - iOS 5 support