After every sleep you have to make sure the variables you use after it aren't null, they could've been deleted.