Fix crash introduced after memory usage reduction