some stability changes to webcam support