libgdx – Can’t get background to work correctly using OrthographicCamera

My initialization code looks like this:

cam = new OrthographicCamera();
cam.setToOrtho(true, gameW, gameH);
viewport = new FitViewport(gameW, gameH, cam);
background = new BackgroundSprite(AssetLoader.getTextureRegion("bgs/1.jpg"));
background.setX( gameW / 2 );
background.setY( gameH / 2 );

Then my update looks like

public void update(float delta) {
    super.update(delta);

    player.update(delta);

    float mapWidth  = background.getRegionWidth();  // is this correct? 
    float mapHeight = background.getRegionHeight();

    // clamp camera so it doesnt' leave the map
    float HW = cam.viewportWidth / 2, HH = cam.viewportHeight / 2;
    cam.position.x = MathUtils.clamp(cam.position.x, HW, mapWidth - HW);
    cam.position.y = MathUtils.clamp(cam.position.y, HH, mapHeight - HH);

The game works, the background scrolls but, there’s a big part from the left side of the background that’s skipped. Also there’s a black gap appearing on the screen if I go down with the player. Is there something wrong in how I get the map width and height?