Fixed issue with trimming space when a line has no content