fix communicator null ptr (and remove some extra spaces)