Next try to fix the max dead record calculation