fixing an NPE that crashes the server