catching html parsing errors