add two methods to avoid null pointer exception in ServerAPI