Added some changes to server accessing code