Fixes a crash