fixed script dependencies detection in self