Added workaround for a very edge-case iOS bug (Fixes #58).