Fixed race problem that can lead to NPE on ClientProxy