Change soryt style and fix sort bug