Fixed debug outputting to client