debugging improvements