Fixed valid local lib detection