Making sure lastBlockEntry isn't null seems to fix the problem