Fixed mostly sorting issues