Fix initialize function