made remote client disconnect when done and removed some warnings