fix line printing buffer overflow