Fix logic around checking deps