Fixed bug in ClientMain