fixed loop in c2r (same condition has to be applied to avoid
forward-backward-switching