fixed possible new line issues due to OS differences