Handle empty data area and empty header area properly.