fixed a bug: } missing in define macro before client.stop()