Fix build & crash