Fixed: only add p_id or command attribute if datatype was Hash.