Bugfixing (including longpaths fix)