Bug Fix: Avoid NPE in the code alled by the client.