Made sure the kinect object waits for all threads to finish before shutting down the Kinect