fix model initialization