fixed a NullPointerException in client only mode