Fixed up initialization code