Fixed dependency detection bug