Fix resolve dependency bug