Core: Fix crash