Fix bug with ordering by created_at