fixed so trailng newline does not get nuked