fixed ordering issue in the pets controller