added code to fix the init of each object