Fix crash in inspector