fixed issue with warning varying by iOS version