remove extra ending new line