Changes to client listener loop