Minor debug fixes