Debugging improvements