Update classes/model.php

fixes a return of the issue in #148