fix model undefined