moved client.close()