Bugfix infinite loop in client