Added missing super calls and some debug code