addd a fix for filtering unwanted dirs