nullpointer exception in Server fixed