small, while important fixes for folder function