Fix initialization code