+ debug code & potential fix for flat repo