Fixing crashes after migration