weird sort bug