Kinect - flickering screen on part of image

Hello - this sketch is from Making Things See by Greg Borenstein and it works except that the image portion created from userMap flickers on the lower half of the user image. Can anyone help me to solve this problem.

On further research it seems the flickering I related to the method kinect.alternativeViewPointDepthToImage() aligning the depth & color images. Any clues what I can do to overcome this?

import processing.opengl.*;
import SimpleOpenNI.*;

SimpleOpenNI  kinect;

boolean tracking = false;
int userID;
int[] userMap;
// declare our background
PImage backgroundImage;

void setup() {
  size(640, 480, P3D);

  kinect = new SimpleOpenNI(this);
  kinect.enableDepth();
  // enable color image from the Kinect
  kinect.enableRGB();
 // kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_NONE);
  kinect.enableUser();
  // turn on depth-color alignment
  kinect.alternativeViewPointDepthToImage();
  // load the background image
  backgroundImage = loadImage("empire_state.jpg");
  frameRate(30);
}

void draw() {
  // display the background image
  image(backgroundImage, 0, 0);
 
  kinect.update();
//  if (tracking) {
    // get the Kinect color image
    PImage rgbImage = kinect.rgbImage();
    // prepare the color pixels
    rgbImage.loadPixels();
    loadPixels();

 //   userMap = kinect.getUsersPixels(SimpleOpenNI.USERS_ALL);
     userMap = kinect.userMap();
    for (int i =0; i < userMap.length; i++) {
      // if the pixel is part of the user
      if (userMap[i] != 0) {
        // set the sketch pixel to the color pixel
 //       pixels[i] = color(0,255,0);
         pixels[i] = rgbImage.pixels[i];
      }
    }
    updatePixels();

//  }
 
}

void onNewUser(int uID) {
  userID = uID;
  tracking = true;
  println("tracking");
}