fixed dependency bug that caused file stack exceeded.