fix index for record