Fixed a sort bug, but the published checkbox still isn't working properly.