Fix similarity matrix init error