Sudden crash bug solved