Fix the problem in initialization function