Fix to crash