Fixed threading issue when new camera is connected