Fix for closing tab while webcam going