corrects crashes