Fix crash due to not knowing how my code works