Bugfix in model