Fix division by 0 when receiving from empty files

Like /dev/zero.