minor debug fixes