bug fix for models