cleanup of flags and label jumps