resorted client.close() calls