bugfix for readFolder method