Add workaround to avoid potential crash during execution of deletion operations on iOS 5. closes #1266