Fix iOS reset

Fix #1639
Fix #1799