Fixing model bug