fixes `dirname` method which cause the error fetching of relative modules