Small bug fix when adding models as global