fixed client/server threading so GUI isnt blocked