Fix crashes
Fix crashes