Fixed model bug