Fixed lightning crash bug