added edge case handling to ipecho read, certain conditions were causing segfaults