Fixed trailing newline issue