small debug fixes