bugfix in some models and controllers