make it work with folders (again)