fix parsing error when no trailing newline