fix for the init function