ofBoxPrimitive Texture Mapping to Specific Sides

I’m trying to map a part of a texture to a side of a ofBoxPrimitive. The problem is when I set the texture coordinates for one side, the other sides’ colors change too.

Here’s the code:

void FCube::setSideTextureCoords(const BoxSides &side, const ofVec4f &coords)
{
    const ofVec4f prevTcoord = m_SideTexCoords.at(side);
    const std::size_t sideTexCoordsCount = getMesh().getNumTexCoords() / SIDES_TOTAL;
    const int sideMultiplier = side == SIDE_TOP ? side + 2 : (side == SIDE_BOTTOM ? side : side + 1);
    const std::size_t texCoordsLimit = (getMesh().getNumTexCoords() / SIDES_TOTAL) * sideMultiplier;

    for (std::size_t j = (sideMultiplier - 1) * sideTexCoordsCount; j < texCoordsLimit; j++) {
        const ofIndexType texIndex = static_cast<ofIndexType>(j);
        ofVec2f tcoord = getMesh().getTexCoord(texIndex);
        tcoord.x = ofMap(tcoord.x, prevTcoord.x, prevTcoord.z, coords.x, coords.z);
        tcoord.y = ofMap(tcoord.y, prevTcoord.y, prevTcoord.w, coords.y, coords.w);

        getMesh().setTexCoord(texIndex, tcoord);
    }

    m_SideTexCoords[side].set(coords.x, coords.y, coords.z, coords.w);
}

Here’s the draw function in ofApp.cpp

void ofApp::draw()
{
    m_EasyCam.begin();
    ofSetColor(255);
    //Skip binding If the cube doesn't have valid texcoords
    if (m_Cube.isUsingTexture()) {
        m_Player.getTexture().bind();
    }
    m_Cube.draw();
    if (m_Cube.isUsingTexture()) {
        m_Player.getTexture().unbind();
    }
    m_EasyCam.end();
}

And here is how it looks

Is there any way to clear the other sides so they would show their true color?