[BUGFIX] Fixed and improved rootline handling