Fix crash due to contexes not synced.