fix trailing new line