Debugging setup and fixes
bugfix