Fixing merge error with models and template error with item_by_sort