bugfixes in folder handling