Fix for files getting added as root directories