Bug of end of file detection.