Fixed an indexing bug in the weight map convresion during initialization