bug fix, len=0 => don't read