fixed NPE in client