bugfix predecessor

I had a problem in going back to the root. This solved my problem but not sure if there are any side effects. Please check! @zacharias2k