Some changes in init function.