fixed/removed debug code