Handles variations in protocol implementation

My webcam implements the protocol slightly differently and I've modified the code to cope with those differences.