Made this plugin work correctly with folders