Fix saving pets to database