fix \r management in offline mode