all clients now get properly removed from the clients array when they disconnect

also some debug stuff and a bugfix