Fixing a buffer overflow error in chomp.