Fixed missing initilization and removed debug traces