fixed undefined model issue..