fix when reading empty files