fix bug in modles