Fixed null pointer exception for ExternalService.java.