bugfix to folder function and dependencies