fix last line parse bug