fix dependency detection