fix sort by call in pets controller
added call to ensure that only active pets are returned in the result set