scan recursive (when walking backwards) fixed