fixes initialization code