fixed a bug when dependency resolves to null