Fix initializing of debugging, add more debug.