detects when server sends a bad formed html page