Fixed client null pointer as well as Server out of bounds