fixed global "client" reference (not found)