Fix sort in plugins