Correct a bug in ls_frag()