Resort elements after marking as in