Fix sync, and revert sorting tasks patch