Fixed a bug where nested folders would throw errors