Fixed Firepit invalid cast crash